<?php
Route::get('/apidoc', function () {return view('test/jsondata');});
Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index');


/*=================================
********** 前端页面  BEGIN ***********
===================================*/
/*
 * app嵌入的WEB页面
 * */
Route::get('/sharedetail/{id}.html',    'web\HomeController@infodetail');               //APP首页的热门文章 在APP端打开，非微信端打开
Route::get('/hotdetail/{id}.html',      'web\HomeController@advertisingdetail');        //热门书籍  APP端打开，非微信打开
Route::get('home/companySourceDetail',      'web\HomeController@company_source_detail');    //公司资源详情


Route::get('/home/mind_share_to_weixin',    'web\HomeController@mind_share_to_weixin');
Route::get('/home/hot_book_share_to_weixin','web\HomeController@hot_book_share_to_weixin');
Route::get('/home/audio_share_to_weixin',   'web\HomeController@audio_share_to_weixin');
Route::get('/home/share_read_plan',         'web\HomeController@share_read_plan');
Route::get('/home/shareGuozhengVideo',      'web\HomeController@share_guozheng_video');       //国政书吧视频
Route::get('/home/articleDetail',           'web\HomeController@article_detail');
Route::get('/home/vcool',                   'web\HomeController@vcool');
Route::get('/home/coolOrderNum',            'web\HomeController@coolOrderNum');
Route::any('/home/coolDataSave',            'web\HomeController@coolDataSave');
Route::any('/home/coolDataShow',            'web\HomeController@coolDataShow');
Route::get('/home/app-page-live-desc',      "web\HomeController@app_page_live_desc");              //直播简介
Route::any('/home/live/dingyue',            "web\HomeController@app_page_live_dingyue");                    //直播订阅


Route::get('/home/book_inner',        'web\HomeController@book_inner');                     //书籍视频详细页面内部图文

Route::get('/membermoneylog/{mobile}-{key}-{id}.html', 'web\WebLoginController@moneylog');  //客户端请求的学习币详情页面
Route::get('/aboutus.html',             'web\HomeController@aboutUs');                      //关于我们
Route::get('/app/version/iso_upgrade', 'web\HomeController@ios_upgrade');



//从APP扫描而来的注册
Route::get('/',                         'web\WebLoginController@getWebLogin');          //注册首页
Route::get('/parent/{id}.html',         'web\WebLoginController@getWebLogin');          //扫描学习官二维码登录系统
Route::any('/web_check_user_exists',    'web\WebLoginController@check_user_exists');
Route::any('/web/weblogin/{action}',    'web\WebLoginController@action');


Route::get('/login-rule',function(){return view('web/weblogin/login-rule');});          //注册服务协议说明

Route::post('/webmobcode.html',         'web\WebLoginController@addMobCode');           //发送验证码 待删除
Route::post('/webcheckMobCode.html',    'web\WebLoginController@checkMobCode');         //检查验证码 待删除

Route::post('/weblogin.html',           'web\WebLoginController@loginstore');           //添加会员
Route::get('/wxpay.html',               'web\WebLoginController@wxpay');                //微信支付

Route::get('/download/downloadPage.html',   'web\DownloadController@download');            //下载APP
Route::get('/downloadpage.html',            'web\DownloadController@download_login');      //下载APP

/*** 前台页面 ***/
Route::get('/login.html',           'web\LoginController@checkUser');   /*微信会员注册界面*/
Route::post('/login.html',          'web\LoginController@loginstore');  /*微信会员注册添加用户*/

Route::get('/pay/pay.html',         'web\LoginController@pay');
Route::get('/pay/paysuccess.html',  'web\LoginController@paysuccess');
Route::get('/pay/wxnotifyurl',      'web\LoginController@wxNotifyUrl');
Route::post('/pay/wxnotifyurl',     'web\LoginController@wxNotifyUrl');
Route::get('/pay/payreturn.html',   'web\LoginController@payreturn');
Route::get('/vip.html',             'web\MemberController@vip');

//手机验证码
Route::get('/mobiletest.html',          'web\LoginController@mobiletest');
Route::post('/mobcode.html',            'web\LoginController@addMobCode');
Route::post('/checkMobCode.html',       'web\LoginController@checkMobCode');

//手机号
Route::any('/mobile/getCode',   'Service\Mobile@get_code');
Route::any('/mobile/checkCode', 'Service\Mobile@check_code');
Route::any('/mobile/callback',  'Service\Mobile@send_mobile_code_callback');

Route::any('/file/saveEditFile','Service\UploadController@save_edit_file');

//绑定老会员
Route::post('/vipmobile.html',          'web\MemberController@vipmobile');
Route::get('/vipsuccess.html',          'web\MemberController@vipsuccess');
Route::post('/vipmobcode.html',         'web\MemberController@addVipMobCode');
Route::post('/vipcheckMobCode.html',    'web\MemberController@vipcheckMobCode');



/*** 微信 ***/
Route::get('/music.html',               'Weixin\WeiXinController@music');
Route::post('/payorder.html',           'web\LoginController@payOrderStore');
Route::get('/testpay/pay.html',         'web\TLoginController@pay');
Route::post('/testpay/payorder.html',   'web\TLoginController@payOrderStore');
Route::get('/testpay/paymax.html',      'web\LoginMaxController@pay');
Route::get('/testpay/paysuccess.html',  'web\LoginMaxController@paysuccess');
Route::post('/testpay/payordermax.html','web\LoginMaxController@payOrderStore');

/** 二维码 **/
Route::get('/qrcode.html', 'web\AgencyController@index');
Route::post('/shareimg.html', 'web\AgencyController@shareimgstore');

/**
 * 合伙人
 */
Route::get('/partner/index.html',           'web\AgencyController@indexPartner');
Route::get('/partner/commission.html',      'web\AgencyController@commission');
Route::get('/partner/bankcodelist.html',    'web\AgencyController@bankcodelist');
Route::get('/partner/bankcode.html',        'web\AgencyController@bankcode');
Route::post('/partner/bankcode',            'web\AgencyController@bankcodeStore');
Route::get('/partner/alipaycode.html',      'web\AgencyController@alipaycode');
Route::post('/partner/alipaycode',          'web\AgencyController@alipaycodeStore');
Route::get('/partner/withdrawmoney/{id?}.html', 'web\AgencyController@withdrawmoney');

Route::post('/partner/mobcode.html',        'web\AgencyController@addMobCode');
Route::post('/partner/checkMobCode.html',   'web\AgencyController@checkMobCode');
Route::get('/partneralert.html',            'web\AgencyController@partneralert');

/** 我的书友**/
Route::get('/partner/bookfriend.html',       'web\AgencyController@bookfriend');
Route::get('/partner/bookfriend/{keyword?}', 'web\AgencyController@searchbookfriend');
Route::get('/partner/bookfriend/{id?}.html', 'web\AgencyController@searchbookfriendTwo');

Route::get('/web/book/login',                   'web\BookController@login');
Route::any('/web/book/login_action',            'web\BookController@login_action');
Route::group(['middleware'=>'memberchecksession'], function() {
    Route::get('/book.html',            'web\BookController@book');
    Route::get('/bookdetail/{id}.html', 'web\BookController@bookdetail');
    Route::get('/audiodetail/{id}.html','web\BookController@audiodetail');
    Route::post('/bookreview.html',     'web\BookController@reviewstore');
    Route::post('/bookcollect.html',    'web\BookController@collectstore');
    Route::get('/search.html',          'web\BookController@searchKeyWord');
    Route::post('/search.html',         'web\BookController@searchKeyWord');
    Route::get('/search/{keyword?}.html', 'web\BookController@search');
    Route::post('/videoplay.html',      'web\BookController@videoplayLog');      /*书籍播放记录*/
    /*
     * 会员中心
     */
    Route::get('/member/index.html',        'web\MemberController@index');
    Route::get('/member/bookmend.html',     'web\MemberController@bookmend');
    Route::get('/member/bookcollect.html',  'web\MemberController@bookcollect');
    Route::get('/member/booklookat.html',   'web\MemberController@booklookat');
    Route::get('/member/wait.html',         'web\MemberController@wait');

});
/*=================================
********** 前端页面  END ***********
===================================*/


Route::group(['prefix'=>'weixin/', 'namespace'=>"Weixin"],function(){
    Route::any('weixinService/service','WeixinServiceController@service');
    Route::get('weixinService/create_menu','WeixinServiceController@create_menu');
    Route::get('weixinService/userinfo','WeixinServiceController@userinfo');
    Route::get('weixinService/oauth_callback/{url}','WeixinServiceController@oauth_callback');
    Route::get('weixinService/template','WeixinServiceController@template');
    Route::get('weixinService/get_openId','WeixinServiceController@get_openId');

});


//众筹666活动
Route::group(['prefix'=>'www/','namespace'=>"www"],function(){
    Route::any('zhongchou666/enter','Zhongchou666Controller@enter');
    Route::any('zhongchou666/{action}','Zhongchou666Controller@action');
    Route::any('zhongchouAdmin/{action}','ZhongchouAdminController@action');
});
